.TH std::lock_guard::lock_guard 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::lock_guard::lock_guard \- std::lock_guard::lock_guard

.SH Synopsis
   explicit lock_guard( mutex_type& m );             \fB(1)\fP \fI(since C++11)\fP
   lock_guard( mutex_type& m, std::adopt_lock_t t ); \fB(2)\fP \fI(since C++11)\fP
   lock_guard( const lock_guard& ) = delete;         \fB(3)\fP \fI(since C++11)\fP

   Acquires ownership of the given mutex m.

   1) Effectively calls m.lock().
   2) Acquires ownership of the mutex m without attempting to lock it. The behavior is
   undefined if the current thread does not hold a non-shared lock (i.e., a lock
   acquired by lock, try_lock, try_lock_for, or try_lock_until) on m.
   3) Copy constructor is deleted.

   The behavior is undefined if m is destroyed before the lock_guard object is.

.SH Parameters

   m - mutex to acquire ownership of
   t - tag parameter used to select non-locking version of the constructor

.SH Exceptions

   1) Throws any exceptions thrown by m.lock().
   2) Throws nothing.
